<%@ Page Title="Positions" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
    AutoEventWireup="true" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Position>>" %>

<%@ Import Namespace="ETestIT.Core" %>
<%@ Import Namespace="ETestIT.Web.Controllers" %>
<%@ Import Namespace="ETestIT.Web.Presentation" %>
<asp:Content ContentPlaceHolderID="MainContentTitlePlaceHolder" runat="server">
    <h2>
        Positions</h2>
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <style type="text/css">
        #container { width: 1170px; min-height: 320px; margin-bottom:30px; margin-left:-200px; overflow-y:hidden; overflow-x:auto; }
        .portlet { margin: 2px; width:140px; }
        .portlet-header { margin: 0.3em; padding-bottom: 4px; padding-left: 0.2em; }
        .portlet-header .ui-icon { float: right; }
        .portlet-content { padding: 0.4em; }
        .dashboard td { width:100px; vertical-align:top;}
    </style>

    <script type="text/javascript">
	$(function() {
		$(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix ui-corner-all")
			.find(".portlet-header")
				.addClass("ui-widget-header ui-corner-all")
				.prepend('<span class="ui-icon ui-icon-plusthick"></span>')
				.end()
			.find(".portlet-content");
	
	    $('.opener').click(function() {
	        
	        var div = $("#" + $(this).attr("position"));
	            div.dialog({
	                autoOpen: false,
		            bgiframe: true,
		            height: 500,
		            width: 600,
		            modal: true
                });
                
                div.dialog("open");
		});

	});
    </script>


    <%= Html.ActionImage<PositionsController>(z => z.Create(), "content/images/add.ico", "") %>           
    <div id="container" class="ui-widget-content ui-corner-all">
        <%= Html.ShowAsDashBoard(ViewData.Model)%>
    </div>
    
</asp:Content>
